package com.fp.m7.client.view;

import com.fp.m7.client.presenter.HeaderPublicPresenter;
import com.google.gwt.core.client.GWT;
import com.google.gwt.event.dom.client.HasClickHandlers;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.user.client.ui.Anchor;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.Widget;

/**
 * Public header view. Has: home, register, login anchors.
 * 
 * @author 7
 */
public class HeaderPublicView extends Composite implements HeaderPublicPresenter.Display {

    private static HeaderPublicViewUiBinder uiBinder = GWT.create(HeaderPublicViewUiBinder.class);

    interface HeaderPublicViewUiBinder extends UiBinder<Widget, HeaderPublicView> {
    }

    @UiField
    Anchor aHome;
    @UiField
    Anchor aRegister;
    @UiField
    Anchor aLogin;

    public HeaderPublicView() {
        initWidget(uiBinder.createAndBindUi(this));
    }

    @Override
    public HasClickHandlers getHomeButton() {
        return aHome;
    }

    @Override
    public HasClickHandlers getLoginButton() {
        return aLogin;
    }

    @Override
    public HasClickHandlers getRegisterButton() {
        return aRegister;
    }

}
